Optimal. Leaf size=71 \[ \frac{4 i a^4 \log (\sin (c+d x))}{d}+\frac{4 i a^4 \log (\cos (c+d x))}{d}-\frac{\cot (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}-8 a^4 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0874361, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3553, 12, 3541, 3475} \[ \frac{4 i a^4 \log (\sin (c+d x))}{d}+\frac{4 i a^4 \log (\cos (c+d x))}{d}-\frac{\cot (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}-8 a^4 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3553
Rule 12
Rule 3541
Rule 3475
Rubi steps
\begin{align*} \int \cot ^2(c+d x) (a+i a \tan (c+d x))^4 \, dx &=-\frac{\cot (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}-\int -4 i a^2 \cot (c+d x) (a+i a \tan (c+d x))^2 \, dx\\ &=-\frac{\cot (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}+\left (4 i a^2\right ) \int \cot (c+d x) (a+i a \tan (c+d x))^2 \, dx\\ &=-8 a^4 x-\frac{\cot (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}+\left (4 i a^4\right ) \int \cot (c+d x) \, dx-\left (4 i a^4\right ) \int \tan (c+d x) \, dx\\ &=-8 a^4 x+\frac{4 i a^4 \log (\cos (c+d x))}{d}+\frac{4 i a^4 \log (\sin (c+d x))}{d}-\frac{\cot (c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}\\ \end{align*}
Mathematica [B] time = 2.28419, size = 151, normalized size = 2.13 \[ \frac{a^4 \csc (c) \sec (c) \csc (c+d x) \sec (c+d x) \left (6 d x \cos (4 c+2 d x)+4 \sin (2 c) \sin (2 (c+d x)) \tan ^{-1}(\tan (5 c+d x))-i \cos (4 c+2 d x) \log \left (\cos ^2(c+d x)\right )+\cos (2 d x) \left (i \log \left (\sin ^2(c+d x)\right )+i \log \left (\cos ^2(c+d x)\right )-6 d x\right )-i \cos (4 c+2 d x) \log \left (\sin ^2(c+d x)\right )+2 \sin (2 d x)\right )}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.044, size = 76, normalized size = 1.1 \begin{align*}{\frac{4\,i{a}^{4}\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}+{\frac{4\,i{a}^{4}\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}-8\,{a}^{4}x-{\frac{{a}^{4}\cot \left ( dx+c \right ) }{d}}+{\frac{{a}^{4}\tan \left ( dx+c \right ) }{d}}-8\,{\frac{{a}^{4}c}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.66617, size = 90, normalized size = 1.27 \begin{align*} -\frac{8 \,{\left (d x + c\right )} a^{4} + 4 i \, a^{4} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 4 i \, a^{4} \log \left (\tan \left (d x + c\right )\right ) - a^{4} \tan \left (d x + c\right ) + \frac{a^{4}}{\tan \left (d x + c\right )}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.20713, size = 150, normalized size = 2.11 \begin{align*} \frac{-4 i \, a^{4} +{\left (4 i \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} - 4 i \, a^{4}\right )} \log \left (e^{\left (4 i \, d x + 4 i \, c\right )} - 1\right )}{d e^{\left (4 i \, d x + 4 i \, c\right )} - d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.2065, size = 58, normalized size = 0.82 \begin{align*} \frac{4 i a^{4} \log{\left (e^{4 i d x} - e^{- 4 i c} \right )}}{d} - \frac{4 i a^{4} e^{- 4 i c}}{d \left (e^{4 i d x} - e^{- 4 i c}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.67399, size = 224, normalized size = 3.15 \begin{align*} -\frac{32 i \, a^{4} \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right ) - 8 i \, a^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - 8 i \, a^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) - 8 i \, a^{4} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) - a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \frac{-8 i \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 5 \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 8 i \, a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + a^{4}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]